a, c = 1, 1

while c < 13:
    print a,
    a, c = a *3, c+1